package com.stay;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;

import org.jsonschema2pojo.SchemaMapper;

import com.sun.codemodel.CodeWriter;
import com.sun.codemodel.JCodeModel;
import com.sun.codemodel.JPackage;

/**
 * @author Stay
 * @version create time：Mar 13, 2014 8:16:15 PM
 */
public class Main {

	/**
	 * @param args
	 * @throws IOException
	 * @throws Exception
	 */
	public static void main(String[] args) throws IOException {
		JCodeModel codeModel = new JCodeModel();
		URL source = new URL("file:///Users/Stay/Documents/workspace/Json/file/address.json");
		new SchemaMapper().generate(codeModel, "MonthTaskResultEntity", "com.guanghua.telecom.entities", source);
		File file = new File(".");
		codeModel.build(file);
	}

}
